package moocloudstudio.minder.model;

import cn.dev33.satoken.stp.SaTokenInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import moocloudstudio.minder.entity.MinderUser;

@Data
@ApiModel("用户信息")
public class UserModel {
    @ApiModelProperty(value = "昵称", position = 1)
    private String nickname;
    @ApiModelProperty(value = "凭证", position = 2)
    private SaTokenInfo tokenInfo;

    public static UserModel create(MinderUser user){
        UserModel userModel = new UserModel();
        userModel.nickname = user.getNickname();
        return userModel;
    }
}
